# $Id$
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=fig2dev
pkgver=3.2.6
pkgrel=1
pkgdesc="Format conversion utility that can be used with xfig"
arch=('i686' 'x86_64')
url="http://mcj.sourceforge.net/"
license=('custom')
depends=('libpng' 'libxpm' 'bc')
makedepends=()
conflicts=('transfig')
replaces=('transfig')
provides=('transfig')
source=(http://downloads.sourceforge.net/mcj/${pkgname}-${pkgver}.tar.xz LICENSE)
sha1sums=('0835c4dc9e69e923cb9e0dceacd292e261bb8137'
          'b8b712871615308b8b6add92f86d218437d652f2')

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr --enable-transfig
  make FIG2DEV_LIBDIR=/usr/share/fig2dev XFIGLIBDIR=/usr/share/xfig
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" XFIGLIBDIR=/usr/share/xfig \
    FIG2DEV_LIBDIR=/usr/share/fig2dev MANPATH=/usr/share/man \
    install
  install -Dm644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
